home *** CD-ROM | disk | FTP | other *** search
-
-
-
- IIIINNNNEEEETTTTDDDD((((1111MMMM)))) IIIINNNNEEEETTTTDDDD((((1111MMMM))))
-
-
-
- NNNNAAAAMMMMEEEE
- inetd - Internet ``super-server''
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ////uuuussssrrrr////eeeettttcccc////iiiinnnneeeettttdddd [ ----RRRR _r_a_t_e ] [ ----dddd ] [ ----llll _q_l_e_n ] [ ----ssss ]
- [ configuration-file ]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- When _i_n_e_t_d is started at boot time by /_e_t_c/_i_n_i_t._d/_n_e_t_w_o_r_k, it reads its
- configuration information from the /_e_t_c/_i_n_e_t_d._c_o_n_f and listens for
- connections on certain internet sockets. When a connection is found on
- one of its sockets, it decides what service the socket corresponds to,
- and invokes a program to service the request. After the program is
- finished, it continues to listen on the socket (except in some cases
- which will be described below). Essentially, _i_n_e_t_d allows running one
- daemon to invoke several others, reducing load on the system.
-
- OOOOPPPPTTTTIIIIOOOONNNNSSSS
- ----RRRR This option controls the maximum number of times a service can be
- invoked in one minute; the default is 1000.
-
- ----dddd This option turns on debugging information. Note that this can
- confuse some applications; use this cautiously.
-
- ----ffff This option is no longer supported and will simply cause a warning
- message to be included in the syslog if used.
-
- ----llll This option changes the listen queue length used for TCP sockets.
- By default this value is 255.
-
- ----ssss Causes inetd to just parse the configuration file (default is
- /etc/inetd.conf) and report any errors. Do not need superuser
- privileges to run inetd using this option.
-
- To specify a different configuration file, put its pathname in the file
- /_e_t_c/_c_o_n_f_i_g/_i_n_e_t_d._o_p_t_i_o_n_s.
-
- CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN FFFFIIIILLLLEEEE
- Each line of the configuration file must be a valid service or a comment.
- Comments are denoted by a ``#'' at the beginning of a line. Each field
- in a line must be specified, with values for each field separated by a
- tab or a space. The fields are as follows:
- service name
- socket type
- protocol
- wait/nowait
- user
- server program
- server program arguments
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- IIIINNNNEEEETTTTDDDD((((1111MMMM)))) IIIINNNNEEEETTTTDDDD((((1111MMMM))))
-
-
-
- There are three types of services that _i_n_e_t_d can start: standard, RPC and
- TCPMUX. A standard service has a well-known port assigned to it and is
- listed in /_e_t_c/_s_e_r_v_i_c_e_s or the NIS _s_e_r_v_i_c_e_s map (see _s_e_r_v_i_c_e_s(4)); it may
- be a service that implements an official Internet standard or is a BSD
- Unix-specific service. RPC services use the Sun RPC calls as the
- transport; such services are listed in /_e_t_c/_r_p_c or the NIS _r_p_c map (see
- _r_p_c(4)). TCPMUX services are nonstandard services that do not have a
- well-known port assigned to them. They are invoked from _i_n_e_t_d when a
- program connects to the ``tcpmux'' well-known port and specifies the
- service name. This feature is useful for adding locally-developed
- servers.
-
- For standard Internet services, the _s_e_r_v_i_c_e _n_a_m_e field is the name of a
- valid service in the _s_e_r_v_i_c_e_s(4) database. For ``internal'' services
- (discussed below), the service name _m_u_s_t be the official name of the
- service (that is, the first field in /_e_t_c/_s_e_r_v_i_c_e_s). For RPC services,
- the value of the _s_e_r_v_i_c_e _n_a_m_e field consists of the RPC service name,
- followed by a slash and either a version number or a range of version
- numbers (e.g., mountd/1). For TCPMUX services, the value of the _s_e_r_v_i_c_e
- _n_a_m_e field consists of the string ``tcpmux'' followed by a slash and the
- locally-chosen service name. If the service name begins with a ``+'', it
- indicates _i_n_e_t_d will handle the initial handshake with the requesting
- program, otherwise the service is responsible for the handshake. (The
- handshake is described in the _i_n_e_t_d section in the _I_R_I_X _N_e_t_w_o_r_k
- _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e.) The service names listed in /_e_t_c/_s_e_r_v_i_c_e_s and the
- name ``help'' are reserved. The ``help'' name causes _i_n_e_t_d to list
- available TCPMUX services. Private protocols should use a service name
- that has a high chance of being unique. A good practice is to prefix the
- service name with the name of your organization. Multiple versions of a
- protocol can suffix the service name with a protocol version number.
-
- The _s_o_c_k_e_t _t_y_p_e should be one of ``stream'', ``dgram'', or ``raw'',
- depending on whether the socket is a stream, datagram, or raw socket.
- TCPMUX services must use ``stream.''
-
- The _p_r_o_t_o_c_o_l must be a valid protocol as given in /_e_t_c/_p_r_o_t_o_c_o_l_s (see
- _p_r_o_t_o_c_o_l_s(4)). Examples might be ``tcp'' or ``udp''. For RPC services,
- the field consists of the string ``rpc'' followed by a slash and the name
- of the protocol (e.g., rpc/tcp or rpc/udp for an RPC service using the
- TCP or UDP protocol as a transport mechanism. If 2 RPC services use the
- same server program with different protocol such as tcp or udp, the 2
- services need to be based on protocol lexicographic order). TCPMUX
- services must use ``tcp.''
-
- The _w_a_i_t/_n_o_w_a_i_t entry specifies whether the server that is invoked by
- _i_n_e_t_d will take over the socket associated with the service access point,
- and thus whether _i_n_e_t_d should wait for the server to exit before
- listening for new service requests. Datagram servers must use wait, as
- they are always invoked with the original datagram socket bound to the
- specified service address. These servers must read at least one datagram
- from the socket before exiting. If a datagram server connects to its
- peer, freeing the socket so _i_n_e_t_d can received further messages on the
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- IIIINNNNEEEETTTTDDDD((((1111MMMM)))) IIIINNNNEEEETTTTDDDD((((1111MMMM))))
-
-
-
- socket, it is said to be a ``multi-threaded'' server; it should read one
- datagram from the socket and create a new socket connected to the peer.
- It should fork, and the parent should then exit to allow _i_n_e_t_d to check
- for new service requests to spawn new servers. Datagram servers which
- process all incoming datagrams on a socket and eventually time out are
- said to be single-threaded. _T_a_l_k_d(8) is an example of the single-
- threaded datagram server. _T_f_t_p_d(8) is an example of a multi-threaded
- datagram server.
-
- Servers using stream sockets generally are multi-threaded and use the
- nowait entry. Connection requests for these services are accepted by
- inetd, and the server is given only the newly-accepted socket connected
- to a client of the service. Most stream-based services operate in this
- manner. Stream-based servers that use wait are started with the
- listening service socket, and must accept at least one connection request
- before exiting. Such a server would normally accept and process incoming
- connection requests until a timeout. RPC services usually wait. TCPMUX
- services must use nowait.
-
- The _u_s_e_r field should contain the user name of the user as whom the
- server should run. This allows for servers to be given less permission
- than root.
-
- The _s_e_r_v_e_r _p_r_o_g_r_a_m field should contain the pathname of the program which
- is to be executed by _i_n_e_t_d when a request is found on its socket. If
- _i_n_e_t_d provides this service internally, this field should be
- ``internal''. For non-internal services, the arguments to the server
- program should be just as they normally are, starting with argv[0], which
- is the name of the program. There is a limit of 11 arguments per program
- (including argv[0]). A `?' character, placed just before the server
- program pathname, causes _i_n_e_t_d to suppress error logging of a missing
- server. As shipped, /_e_t_c/_i_n_e_t_d._c_o_n_f uses `?' to suppress error logging
- for servers that are included in optional software packages.
-
- _I_n_e_t_d provides several trivial services internally by use of routines
- within itself. These services are ``echo'', ``discard'', ``chargen''
- (character generator), ``daytime'' (human readable time), ``time''
- (machine readable time, in the form of the number of seconds since
- midnight, January 1, 1900), and ``tcpmux'' (service multiplexor). All of
- these services are TCP-based. For details of these services, consult
- RFCs 862, 863, 864, 867, 868, and 1078.
-
- _I_n_e_t_d rereads its configuration file when it receives a hangup signal,
- SIGHUP. Services may be added, deleted or modified when the
- configuration file is reread. To disable a service, add the comment
- character ``#'' at the beginning of the service's line in inetd.conf and
- send SIGHUP to _i_n_e_t_d with the command
-
- /etc/killall -HUP inetd
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- IIIINNNNEEEETTTTDDDD((((1111MMMM)))) IIIINNNNEEEETTTTDDDD((((1111MMMM))))
-
-
-
- EEEERRRRRRRROOOORRRR MMMMEEEESSSSSSSSAAAAGGGGEEEESSSS
- _I_n_e_t_d logs error messages using _s_y_s_l_o_g(3B). Important error messages and
- their explanations are:
-
- _s_e_r_v_i_c_e/_p_r_o_t_o_c_o_l server failing (looping), service terminated.
-
- The number of requests for the specified service in the past minute
- exceeded the limit. The limit exists to prevent a broken program or a
- malicious user from swamping the system. This message may occur for
- several reasons: 1) there are lots of hosts requesting the service
- within a short time period, 2) a 'broken' client program is requesting
- the service too frequently, 3) a malicious user is running a program to
- invoke the service in a 'denial of service' attack, or 4) the invoked
- service program has an error that causes clients to retry quickly. Use
- the ----RRRR option, as described above, to change the rate limit. Once the
- limit is reached, the service will be reenabled automatically in 10
- minutes.
-
-
- _s_e_r_v_i_c_e/_p_r_o_t_o_c_o_l: such user '_u_s_e_r', service ignored
- _s_e_r_v_i_c_e/_p_r_o_t_o_c_o_l: getpwnam: _u_s_e_r: No such user
-
- No entry for _u_s_e_r exists in the _p_a_s_s_w_d file. The first message occurs
- when _i_n_e_t_d (re)reads the configuration file. The second message occurs
- when the service is invoked.
-
-
- _s_e_r_v_i_c_e: can't set uid _n_u_m_b_e_r
- _s_e_r_v_i_c_e: can't set gid _n_u_m_b_e_r
-
- The user or group ID for the entry's _u_s_e_r is invalid.
-
-
- too many services: open-file limit reached.
-
- The number of services in the configuration file exceeds the number of
- file descriptors that _i_n_e_t_d can keep open. Unnecessary services must be
- removed or commented out or the kernel must be reconfigured to increase
- the limit (the NOFILES parameter in /_v_a_r/_s_y_s_g_e_n/_m_a_s_t_e_r._d/_k_e_r_n_e_l.)
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- Here are several example service entries for the various types of
- services
-
- ftp stream tcp nowait root /usr/etc/ftpd ftpd -l
- ntalk dgram udp wait root /usr/etc/talkd talkd
- rusersd/1 dgram rpc/udp wait root /usr/etc/rpc.rusersd rusersd
- tcpmux/+date stream tcp nowait guest /bin/date date
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- IIIINNNNEEEETTTTDDDD((((1111MMMM)))) IIIINNNNEEEETTTTDDDD((((1111MMMM))))
-
-
-
- NNNNOOOOTTTTEEEE
- If NIS is enabled on your system, _i_n_e_t_d uses the NIS equivalents of
- /_e_t_c/_s_e_r_v_i_c_e_s and /_e_t_c/_r_p_c. Make sure your NIS server's _s_e_r_v_i_c_e_s and _r_p_c
- databases contain the entries listed in these files.
-
- NNNNOOOOTTTTEEEESSSS
- iiiinnnneeeettttdddd has a limit of 512 characters per line of the configuration file.
- Exceeding this limit may cause inetd to terminate abnormally.
-
- If both TCP and UDP services are listed for an RPC service, the TCP
- service should be listed first.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ftpd(1M), rexecd(1M), rlogind(1M), rshd(1M), telnetd(1M), tftpd(1M).
- sockets programming chapter in the _I_R_I_X _N_e_t_w_o_r_k _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e.
- RFCs are available from the Network Information Center at SRI
- International, Menlo Park, CA.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-